import type { LoadingState } from '@/types/pinia'

export const useLoadingStore = defineStore('loading', {
	state: (): LoadingState => ({ isLoading: false }),
	actions: {
		open() {
			this.isLoading = true
		},
		close() {
			this.isLoading = false
		}
	},
	getters: {
		getIsLoading: state => state.isLoading
	},
	persist: false
})
